package com.jcgyl.export.util;

import org.apache.shiro.crypto.hash.SimpleHash;
import org.apache.shiro.util.ByteSource;



/**
 * MD5加密方法
 * @author Administrator
 *JL
 */

public class PasswordHelper {
		//加密的方法
		private static String algorithmName = "MD5";
		//加密的次数
		private static int hashIterations = 1024;

		public static String encryptPassword(String password,String salt) {
			String newPassword = new SimpleHash(algorithmName, password,  ByteSource.Util.bytes(salt), hashIterations).toHex();
			return newPassword;

		}
		
	}

